-
Notifications
You must be signed in to change notification settings - Fork 3.9k
xds: Support deprecated xDS TLS fields for Istio compat #12435
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… field Add backward compatibility for deprecated certificate provider field 11 (tls_certificate_certificate_provider_instance) by falling back to it when field 14 (tls_certificate_provider_instance) is not present. This matches the behavior of grpc-go and grpc-cpp, enabling compatibility with Istio which sends the deprecated field for backward compatibility with older Envoy versions. Amp-Thread-ID: https://ampcode.com/threads/T-a71beee4-6f09-48fb-a8f8-9f2e09c1623f Co-authored-by: Amp <[email protected]>
0aa24a0 to
f142fa1
Compare
...src/main/java/io/grpc/xds/internal/security/certprovider/CertProviderSslContextProvider.java
Outdated
Show resolved
Hide resolved
Add @SuppressWarnings("deprecation") to test helper that intentionally uses deprecated field to verify backward compatibility.
Add fallback to deprecated validation_context_certificate_provider_instance (field 4) in CombinedValidationContext for Istio compatibility.
Why isn't the fix here "send both the old and new fields in Istio"? Just because older Envoys need it doesn't mean you can't include the newer field. I think these fields were removed in 65d0bb8 . Basically, these should never have been used in production in gRPC. The only reason to add them back is to give time for Istio to update their fields. Is that happening? |
|
@laz-canva, can you reach out on the Istio repo to send both the new and old fields? |
|
Sure I'll work on this on the istio side of things
…On Thu, Nov 6, 2025, 19:26 Kannan J ***@***.***> wrote:
*kannanjgithub* left a comment (grpc/grpc-java#12435)
<#12435 (comment)>
@laz-canva <https://github.com/laz-canva>, can you reach out on the Istio
repo to send both the new and old fields?
—
Reply to this email directly, view it on GitHub
<#12435 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BSU5OMVUPTI4GTXDOEGQFFT33MO4XAVCNFSM6AAAAACJ45VEPGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTIOJWGQYTMMJYGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
**
** <https://www.canva.com/>
Empowering the world to design
We're hiring,
apply here <https://www.canva.com/careers/>! Check out the latest news and
learnings from our team on the Canva Newsroom
<https://www.canva.com/newsroom/news/>.
<https://twitter.com/canva>
<https://facebook.com/canva>
<https://au.linkedin.com/company/canva>
<https://twitter.com/canva> <https://facebook.com/canva>
<https://www.linkedin.com/company/canva>
<https://instagram.com/canva>
|
Istio PR to send both: istio/istio#58257 |
## Problem When using xDS with Istio's grpc-agent in proxyless mode, Java gRPC fails with: ``` LDS response Listener validation error: tls_certificate_provider_instance is required in downstream-tls-context ``` **Root Cause:** Istio sends deprecated certificate provider fields for backward compatibility with older Envoy versions. Java gRPC currently only reads the current fields, causing validation failures. Specifically, Istio uses these deprecated fields: 1. **Field 11**: `tls_certificate_certificate_provider_instance` (deprecated) instead of field 14 (`tls_certificate_provider_instance`) 2. **Field 4**: `validation_context_certificate_provider_instance` in `CombinedValidationContext` (deprecated) instead of `ca_certificate_provider_instance` in `default_validation_context` ## Fix Istio is adding support for the new fields in istio/istio#58257. Add fallback logic to support deprecated certificate provider fields before that is rolled out: **For identity certificates:** 1. Try current field 14 (`tls_certificate_provider_instance`) first 2. Fall back to deprecated field 11 (`tls_certificate_certificate_provider_instance`) **For validation context in CombinedValidationContext:** 1. Try `ca_certificate_provider_instance` in `default_validation_context` first 2. Fall back to deprecated field 4 (`validation_context_certificate_provider_instance`) This matches the behavior of [grpc-cpp](https://github.com/grpc/grpc/blob/master/src/core/xds/grpc/xds_common_types_parser.cc#L435-L474) and [grpc-go](https://github.com/grpc/grpc-go/blob/master/internal/xds/xdsclient/xdsresource/unmarshal_cds.go#L310-L344) implementations. ## Testing * Added new tests for both deprecated field paths (field 11 and field 4) * All existing tests pass * Manual local testing with Istio in proxyless mode verified the compatibility fix works --------- Co-authored-by: Amp <[email protected]>
## Problem When using xDS with Istio's grpc-agent in proxyless mode, Java gRPC fails with: ``` LDS response Listener validation error: tls_certificate_provider_instance is required in downstream-tls-context ``` **Root Cause:** Istio sends deprecated certificate provider fields for backward compatibility with older Envoy versions. Java gRPC currently only reads the current fields, causing validation failures. Specifically, Istio uses these deprecated fields: 1. **Field 11**: `tls_certificate_certificate_provider_instance` (deprecated) instead of field 14 (`tls_certificate_provider_instance`) 2. **Field 4**: `validation_context_certificate_provider_instance` in `CombinedValidationContext` (deprecated) instead of `ca_certificate_provider_instance` in `default_validation_context` ## Fix Istio is adding support for the new fields in istio/istio#58257. Add fallback logic to support deprecated certificate provider fields before that is rolled out: **For identity certificates:** 1. Try current field 14 (`tls_certificate_provider_instance`) first 2. Fall back to deprecated field 11 (`tls_certificate_certificate_provider_instance`) **For validation context in CombinedValidationContext:** 1. Try `ca_certificate_provider_instance` in `default_validation_context` first 2. Fall back to deprecated field 4 (`validation_context_certificate_provider_instance`) This matches the behavior of [grpc-cpp](https://github.com/grpc/grpc/blob/master/src/core/xds/grpc/xds_common_types_parser.cc#L435-L474) and [grpc-go](https://github.com/grpc/grpc-go/blob/master/internal/xds/xdsclient/xdsresource/unmarshal_cds.go#L310-L344) implementations. ## Testing * Added new tests for both deprecated field paths (field 11 and field 4) * All existing tests pass * Manual local testing with Istio in proxyless mode verified the compatibility fix works --------- Co-authored-by: Amp <[email protected]>
Problem
When using xDS with Istio's grpc-agent in proxyless mode, Java gRPC fails with:
Root Cause:
Istio sends deprecated certificate provider fields for backward compatibility with older Envoy versions. Java gRPC currently only reads the current fields, causing validation failures.
Specifically, Istio uses these deprecated fields:
tls_certificate_certificate_provider_instance(deprecated) instead of field 14 (tls_certificate_provider_instance)validation_context_certificate_provider_instanceinCombinedValidationContext(deprecated) instead ofca_certificate_provider_instanceindefault_validation_contextFix
Add fallback logic to support deprecated certificate provider fields:
For identity certificates:
tls_certificate_provider_instance) firsttls_certificate_certificate_provider_instance)For validation context in CombinedValidationContext:
ca_certificate_provider_instanceindefault_validation_contextfirstvalidation_context_certificate_provider_instance)This matches the behavior of grpc-cpp and grpc-go implementations.
Testing